﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true"
    CodeBehind="Propriedades.aspx.cs" Inherits="SERIX.Propriedades" Title="Propriedades" %>

<%@ Register Src="Controles/Navegador.ascx" TagName="Navegador" TagPrefix="uc3" %>
<%@ Register Src="Controles/lovGenerica.ascx" TagName="lovGenerica" TagPrefix="uc4" %>


<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
            <td class="secao_titulo" style="width: 284px">
                <table style="width: 257%; height: 20px;">
                    <tr>
                        <td>
                Propriedades</td>
                        <td style="width: 51px">
                            &nbsp;</td>
                    </tr>
                </table>
                <hr class="linhaHorizontal" style="width: 740px" />
            </td>
        </tr>
    </table>
    <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
        <tr>
                       
            <td align="center" id="tdMestre" runat="server" style="height: 28px">
            <asp:Panel ID="Panel2" CssClass="grid_mestre" Visible="true" runat="server"> 
                <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td style="width: 100%; text-align: center;">
                            <asp:Label ID="lbMestre" runat="server" Text="Mestre"></asp:Label>
                        </td>
                        <td align="left" style="width: 16px; height: 16px; text-align: right;">
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Imagens/botoes/remove.png"
                                OnClick="ImageButton1_Click" CausesValidation="False" ToolTip="Remover Filtro Mestre" />
                        </td>
                    </tr>
                </table>
                </asp:Panel>
            </td>
            
        </tr>
        <tr>
            <td align="left" class="barra" style="width: 543px;">
                <asp:Button ID="btnNovo" runat="server" Font-Bold="True" OnClick="btnNovo_Click"
                    TabIndex="1" Text="Novo" UseSubmitBehavior="False" Width="105px" />
            &nbsp;
                <asp:Button ID="btnBenef" runat="server" Font-Bold="True" OnClick="btnBenef_Click"
                    TabIndex="1" Text="Voltar" UseSubmitBehavior="False" Width="105px" 
                    Visible="False" />
            </td>
        </tr>
        <tr>
            <td align="center" class="grid_titulo">
                <asp:Panel ID="Panel1" runat="server" BorderWidth="0" BorderStyle="None" DefaultButton="btnPequisar">
                    Descrição<span style="color: #FFFFFF">: </span>
                    <asp:TextBox ID="txtFiltrar" runat="server" MaxLength="50" TabIndex="2" 
                        Width="127px" AutoPostBack="True" ontextchanged="txtFiltrar_TextChanged"></asp:TextBox>
                    &nbsp;<asp:Label ID="lbpor" runat="server" Text="Por:"></asp:Label>
&nbsp;<asp:DropDownList ID="ddlPor" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="ddlPor_SelectedIndexChanged">
                        <asp:ListItem>PROPRIEDADE - Por Código</asp:ListItem>
                        <asp:ListItem>PROPRIEDADE - Por Nome</asp:ListItem>
                        <asp:ListItem>BENEFICIÁRIO - Por CPF</asp:ListItem>
                        <asp:ListItem>PROPRIETÁRIO - Por CPF</asp:ListItem>
                        <asp:ListItem>PROPRIETÁRIO - Por Nome</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                    <asp:Label ID="lbMunicipios" runat="server" Text="Municipios:"></asp:Label>
                    &nbsp;<asp:TextBox ID="tbMunicipio" runat="server" Enabled="False"></asp:TextBox>
                    <uc4:lovGenerica ID="lovMunicipio" runat="server" />
                    <br /><asp:Label ID="lbComunidade" runat="server" Text="Comunidade:  "></asp:Label>
                    &nbsp;<asp:TextBox ID="tbComunidade" runat="server" Enabled="False"></asp:TextBox>
                    <uc4:lovGenerica ID="lovComunidade" runat="server" />
                    <br />
                    <asp:CheckBox ID="cbAtivos" runat="server" Text="Somente Ativas" 
                        Visible="False" />
                    &nbsp;
                    <asp:Button ID="btnPequisar" runat="server" Font-Bold="True" OnClick="btnPequisar_Click"
                        TabIndex="5" Text="Pesquisar" Width="80px" />
                    &#160;&#160;<asp:Button ID="btnTodos" runat="server" Font-Bold="True" OnClick="btnTodos_Click"
                        TabIndex="6" Text="Todos" UseSubmitBehavior="False" Width="80px" />
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="left" style="color: #000000">
                <asp:Label ID="lblFiltro" runat="server" CssClass="filtro" TabIndex="-1" Text="Filtro: "></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <asp:GridView ID="gridView" runat="server" DataKeyNames="IDT_PROP" AutoGenerateColumns="False" CssClass="grid"
                    OnRowDataBound="gridView_RowDataBound" PageSize="5" 
                    EmptyDataText="Nenhuma registro encontrado." 
                    onrowcommand="gridView_RowCommand">
                    <Columns>
                        <asp:BoundField DataField="IDT_PROP" HeaderText="Código" 
                            SortExpression="IDT_PROP" ItemStyle-Width="80px"
                             >
<ItemStyle Width="80px"></ItemStyle>
                        </asp:BoundField>
                        <asp:BoundField DataField="NOME_PROP" HeaderText="Nome" SortExpression="NOME_PROP"
                            ItemStyle-Width="520px">
                            <ItemStyle Width="520px" HorizontalAlign="Left"></ItemStyle>
                        </asp:BoundField>
                        <asp:TemplateField FooterText="Detalhes" HeaderText="Detalhes" 
                            ItemStyle-Width="70px" Visible="False">
                            <ItemTemplate>
                                <asp:HyperLink ID="Detalhes_HyperLink" runat="server" ImageUrl="Imagens/botoes/Detail.png">Detalhes</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField FooterText="Editar" HeaderText="Editar" ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:HyperLink ID="Editar_HyperLink" runat="server" ImageUrl="Imagens/botoes/Edit.png">Editar</asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField FooterText="Status" HeaderText="Ativa" 
                            ItemStyle-Width="70px" Visible="True">
                            <ItemTemplate>
                                <asp:CheckBox ID="cbAtiva" runat="server" AutoPostBack="True" 
                                    oncheckedchanged="cbAtiva_CheckedChanged" />
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Opções" Visible="False">
                        </asp:TemplateField>
                        <asp:ButtonField ButtonType="Image" CommandName="Vinculo" HeaderText="Vinculo" 
                            ImageUrl="~/Imagens/botoes/Adicionar.png" Visible="False" />
                    </Columns>
                    <AlternatingRowStyle CssClass="row_alter" />
                    <EmptyDataRowStyle CssClass="emptyrow" />
                    <FooterStyle CssClass="footer" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                    <RowStyle CssClass="row" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <uc3:Navegador ID="Navegador1" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
